home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-071.TXT < prev    next >
Encoding:
Text File  |  1992-06-04  |  41.4 KB  |  1,131 lines

  1. C.S.M.P. Digest             Mon, 04 May 92       Volume 1 : Issue 71
  2.  
  3. Today's Topics:
  4.  
  5.     Memory management
  6.     In MPW C, how do you cure a Jump Table Offset is out of range error?
  7.     Passwords with ModalDialog
  8.     Launch App & Doc
  9.     Increasing an application's heap size
  10.     No, I'm Not Programming Graphics & Sound, I'm Playing 
  11.     MPW shell script parameter manipulation
  12.     SUMMARY: Hotels in San Jose / WWDC in May
  13.     Dialog/Think C Questions
  14.  
  15.  
  16. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  17.  
  18. These digests are available (by using FTP, account anonymous, your email
  19. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  20. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  21. Questions list.  The last several issues of the digest are available from
  22. sumex-aim.stanford.edu as well.
  23.  
  24. These digests are also available via email.  Just send a note saying that you
  25. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  26. automatically receive each new digest as it is created.
  27.  
  28. The articles in these digests are taken directly from comp.sys.mac.programmer.
  29. They are not edited; all articles included in this digest are in their original
  30. posted form.  The only articles that are -not- included in these digests are
  31. those which didn't receive any replies (except those that give information
  32. rather than ask a question).  All replies to each article are concatenated
  33. onto the original article in the order in which they were received.  Article
  34. threads are not added to the digests until the last article added to the
  35. thread is at least one month old (this is to ensure that the thread is dead
  36. before adding it to the digests).
  37.  
  38. Send administrative mail to mkelly@cs.uoregon.edu.
  39.  
  40. -------------------------------------------------------
  41.  
  42. From: kallman@idicl1.idi.battelle.org
  43. Subject: Memory management
  44. Date: 10 Mar 92 16:19:14 GMT
  45. Organization: IDI-Dublin
  46.  
  47. I need to develop a generic memory allocation routine, which would emulate
  48. the C-RTL function malloc() and return a pointer to a location in memory,
  49. but I would like to do this using the Memory Manager routines
  50.  
  51. Furthermore, I would like to be able to allocate this chunk of memory using
  52. NewHandle(), move this into high memory, and then lock it.  My question is,
  53. what is the appropriate way to return a pointer to this block in high
  54. memory?
  55.  
  56. Any help would be greatly appreciated.
  57.  
  58. Joel
  59.  
  60. BTW, I'm doing this in Think C 5.0 and their implementation of malloc()
  61. doesn't satisfy my requirements.
  62.  
  63. +++++++++++++++++++++++++++
  64.  
  65. From: e-sink@uiuc.edu (Eric W. Sink)
  66. Organization: University of Illinois at Urbana-Champaign
  67. Date: Wed, 11 Mar 1992 14:56:03 GMT
  68.  
  69. In <1992Mar10.111914.1@idicl1.idi.battelle.org> kallman@idicl1.idi.battelle.org writes:
  70.  
  71. >I need to develop a generic memory allocation routine, which would emulate
  72. >the C-RTL function malloc() and return a pointer to a location in memory,
  73. >but I would like to do this using the Memory Manager routines
  74.  
  75. >Furthermore, I would like to be able to allocate this chunk of memory using
  76. >NewHandle(), move this into high memory, and then lock it.  My question is,
  77. >what is the appropriate way to return a pointer to this block in high
  78. >memory?
  79.  
  80. Not too difficult.
  81.  
  82. Handle h;
  83. h = NewHandle(SIZE);
  84. MoveHHi(h);
  85. HLock(h);
  86. return *h;
  87.  
  88. BTW, take a quick peek at the malloc() written by Tim Endres.  You can
  89. get it by anon ftp from harvest.cecer.army.mil in pub/mac/src.  Let me
  90. know if it suits your needs.
  91.  
  92. - -- 
  93. Eric W. Sink,  Spatial Analysis and Systems Team
  94. USACERL, P.O. Box 9005, Champaign, IL 61826-9005
  95. 1-800-USA-CERL x449,   e-sink@uiuc.edu
  96.  
  97. +++++++++++++++++++++++++++
  98.  
  99. From: REEKES@applelink.apple.com (Jim Reekes)
  100. Date: 20 Mar 92 20:08:56 GMT
  101. Organization: Apple Computer, Inc.
  102.  
  103. In article <1992Mar11.145603.14782@sunb10.cs.uiuc.edu>, e-sink@uiuc.edu (Eric W. Sink) writes:
  104. > In <1992Mar10.111914.1@idicl1.idi.battelle.org> kallman@idicl1.idi.battelle.org writes:
  105. > >I need to develop a generic memory allocation routine, which would emulate
  106. > >the C-RTL function malloc() and return a pointer to a location in memory,
  107. > >but I would like to do this using the Memory Manager routines
  108. > >Furthermore, I would like to be able to allocate this chunk of memory using
  109. > >NewHandle(), move this into high memory, and then lock it.  My question is,
  110. > >what is the appropriate way to return a pointer to this block in high
  111. > >memory?
  112. > Not too difficult.
  113. > Handle h;
  114. > h = NewHandle(SIZE);
  115. > MoveHHi(h);
  116. > HLock(h);
  117. > return *h;
  118.  
  119. If you're just going to keep the memory locked, then use NewPtr.  Handles
  120. are suppose to be relocatable.  You move them high for temporaray reasons.
  121. MoveHHi will lead you to fragmentation problems.  So, for a malloc routine
  122. I would recommend NewPtr.  But honestly, I wouldn't use malloc for anything
  123. designed to run on a Macintosh.
  124.  
  125.  
  126. - -----------------------------------------------------------------------
  127. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  128.                              |          Sound Manager Expert
  129. Apple Computer, Inc.         | "All opinions expressed are mine, and do
  130. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  131. Cupertino, CA 95014          |       employer, Apple Computer Inc."
  132.  
  133. +++++++++++++++++++++++++++
  134.  
  135. From: brunner@brchh87.bnr.ca (James Brunner)
  136. Date: 23 Mar 92 20:13:45 GMT
  137.  
  138. In article <1992Mar10.111914.1@idicl1.idi.battelle.org>, kallman@idicl1.idi.battelle.org writes:
  139. |> I need to develop a generic memory allocation routine, which would emulate
  140. |> the C-RTL function malloc() and return a pointer to a location in memory,
  141. |> but I would like to do this using the Memory Manager routines
  142. |> 
  143. |> Furthermore, I would like to be able to allocate this chunk of memory using
  144. |> NewHandle(), move this into high memory, and then lock it.  My question is,
  145. |> what is the appropriate way to return a pointer to this block in high
  146. |> memory?
  147.  
  148. What's the point???  I mean why whould you want to allocate a relocatable
  149. block, move it to a fixed location, and permanently lock it?
  150.  
  151. Just use NewPtr.  Allocate a fixed block (that's what you want anyway).
  152. NewPtr automagically allocates the block in high (or is it low) memory.
  153. Return pointers to smaller blocks in one (or several) large fixed blocks.
  154. - -- 
  155. - ---------------------------------------------------------------------------
  156. Jim Brunner - (brunner@brchh87.BNR.CA)
  157. All opinions are my own and have nothing whatsoever to do with BNR, NT,
  158. NTI, Bell Canada, or any of the BCE corporations or affiliates.
  159.  
  160. +++++++++++++++++++++++++++
  161.  
  162. From: lsr@taligent.com (Larry Rosenstein)
  163. Date: 2 Apr 92 01:30:58 GMT
  164. Organization: Taligent, Inc.
  165.  
  166. In article <7148@brchh104.bnr.ca>, brunner@brchh87.bnr.ca (James Brunner)
  167. writes:
  168. > What's the point???  I mean why whould you want to allocate a relocatable
  169. > block, move it to a fixed location, and permanently lock it?
  170. > Just use NewPtr.  Allocate a fixed block (that's what you want anyway).
  171. > NewPtr automagically allocates the block in high (or is it low) memory.
  172.  
  173. NewPtr puts the block as low as possible, which makes it much slower than if you
  174. call NewHandle and lock the handle.  Which approach to take depends on how you
  175. are using the memory, and what else your program does.
  176. - --
  177. Larry Rosenstein
  178. Taligent, Inc.
  179. lsr@taligent.com
  180.  
  181. ---------------------------
  182.  
  183. From: Haydn Huntley <huntley@garbo.cs.indiana.edu>
  184. Subject: In MPW C, how do you cure a Jump Table Offset is out of range error?
  185. Organization: Indiana University, Bloomington
  186. Date: Mon, 23 Mar 1992 23:40:50 -0500
  187.  
  188.  
  189. I'm trying to compile the GNU version of the M4 macro processor for
  190. MPW C as an MPW tool, and I've gotten all of the files to compile, but
  191. I can't get them to link, because I keep getting "Error: Jump Table
  192. Offset is out of range".  Can anyone help me?
  193.  
  194. BTW, I'm using MPW 3.0, rather than the latest version, if that makes
  195. a difference.  Any and *all* help will be *greatly* appreciated!  :-)
  196.  
  197. - --Haydn
  198.  
  199. Here's the link command and the results:
  200.  
  201. Link -w -c 'MPS ' -t MPST -p -ss 500000 <del>
  202.     :ObjFolder:m4.c.o :ObjFolder:input.c.o :ObjFolder:output.c.o <del>
  203.     :ObjFolder:symtab.c.o :ObjFolder:builtin.c.o :ObjFolder:macro.c.o <del>
  204.     :ObjFolder:debug.c.o :ObjFolder:eval.c.o :ObjFolder:path.c.o <del>
  205.     :ObjFolder:format.c.o :ObjFolder:regex.c.o :ObjFolder:obstack.c.o <del>
  206.     :ObjFolder:getopt.c.o :ObjFolder:getopt1.c.o <del>
  207.     :ObjFolder:alloca.c.o  <del>
  208.     -sn STDIO=Main <del>
  209.     -sn INTENV=Main <del>
  210.     -sn %A5Init=Main <del>
  211.     "{Libraries}"Stubs.o <del>
  212.     "{CLibraries}"CRuntime.o <del>
  213.     "{CLibraries}"StdCLib.o <del>
  214.     "{CLibraries}"CInterface.o <del>
  215.     "{Libraries}"Interface.o <del>
  216.     "{Libraries}"ToolLibs.o <del>
  217.     -o M4
  218.  
  219. MC68000 Linker - v. 3.0 Release 1-Nov-1988          Start: 11:06:05 PM
  220. 3/23/92
  221.  
  222.  Copyright Apple Computer, Inc. 1985-1988
  223.  All Rights Reserved.
  224.  
  225. Reading files:
  226.   File:   1 ":ObjFolder:m4.c.o"
  227.   File:   2 ":ObjFolder:input.c.o"
  228.   File:   3 ":ObjFolder:output.c.o"
  229.   File:   4 ":ObjFolder:symtab.c.o"
  230.   File:   5 ":ObjFolder:builtin.c.o"
  231.   File:   6 ":ObjFolder:macro.c.o"
  232.   File:   7 ":ObjFolder:debug.c.o"
  233.   File:   8 ":ObjFolder:eval.c.o"
  234.   File:   9 ":ObjFolder:path.c.o"
  235.   File:  10 ":ObjFolder:format.c.o"
  236.   File:  11 ":ObjFolder:regex.c.o"
  237.   File:  12 ":ObjFolder:obstack.c.o"
  238.   File:  13 ":ObjFolder:getopt.c.o"
  239.   File:  14 ":ObjFolder:getopt1.c.o"
  240.   File:  15 ":ObjFolder:alloca.c.o"
  241.   File:  16 "HD105:MPW:Libraries:Libraries:Stubs.o"
  242.   File:  17 "HD105:MPW:Libraries:CLibraries:CRuntime.o"
  243.   File:  18 "HD105:MPW:Libraries:CLibraries:StdCLib.o"
  244.   File:  19 "HD105:MPW:Libraries:CLibraries:CInterface.o"
  245.   File:  20 "HD105:MPW:Libraries:Libraries:Interface.o"
  246.   File:  21 "HD105:MPW:Libraries:Libraries:ToolLibs.o"
  247. Doing active analysis.
  248.   Max. depth of search: 22
  249. Size of global data area: 7952
  250.  
  251. Input summary:   
  252.   Read   Max              Bytes
  253.   1388       Strings    
  254.     13       Str Blks     26702
  255.   1771 65535 Symbols      99176
  256.     37       ID-Sym Blks  37888
  257.     21       Files     
  258.      9       Segments   
  259.   1731       Modules    
  260.   2408 65535 Ref. Lists   28896
  261.    Total bytes:   192662
  262.  
  263. 739 active and 68 visible entries of 1731 read.
  264.   3 segments, 68 Jump Table entries.
  265. ### Link: Error: Jump Table Offset is out of range. (Error 50) CMain
  266. ### Link: Error: Jump Table Offset is out of range. (Error 50)__cleanup
  267. ### Link: Error: Jump Table Offset is out of range. (Error 50) sig_dfl
  268. ### Link: Error: Jump Table Offset is out of range. (Error 50)_coreIOExit
  269. ### Link: Error: Jump Table Offset is out of range. (Error 50) raise
  270. ### Link: Errors prevented normal completion.
  271. There were 5 errors.
  272. Execution required 9 seconds.
  273. - -- 
  274. ;;  *****************************************************
  275. ;;  *  Haydn Huntley    huntley@copper.ucs.indiana.edu  *
  276. ;;  *****************************************************
  277.  
  278. +++++++++++++++++++++++++++
  279.  
  280. From: ksand@apple.com (Kent Sandvik)
  281. Date: 2 Apr 92 02:25:06 GMT
  282. Organization: MacDTS Mongols
  283.  
  284. In article <1992Mar23.234054.21706@news.cs.indiana.edu>,
  285. huntley@garbo.cs.indiana.edu (Haydn Huntley) writes:
  286. > I'm trying to compile the GNU version of the M4 macro processor for
  287. > MPW C as an MPW tool, and I've gotten all of the files to compile, but
  288. > I can't get them to link, because I keep getting "Error: Jump Table
  289. > Offset is out of range".  Can anyone help me?
  290. > BTW, I'm using MPW 3.0, rather than the latest version, if that makes
  291. > a difference.  Any and *all* help will be *greatly* appreciated!  :-)
  292.  
  293. It seems to be one of the classical cases where 16-bit offsets 
  294. are not enough for the linking. You are using MPW 3.0, so model
  295. far support is out of the question. My suggestion would be to either
  296. change the linked library ordering, which maybe would make it suddenly
  297. possible to call functions within 16-bit offsets, or then do some
  298. creative segmentation and move functions around so they call each
  299. other inside the same segment (i.e. no need for a jump table entry).
  300.  
  301. Hope this helps...
  302.  
  303. Kent
  304. - --
  305. Kent Sandvik/DTS - Dynamic Language Evangelist.
  306. Opinions expressed are not private, and not owned by any company, 
  307. organization or group. Happy happy, joy joy!
  308.  
  309. ---------------------------
  310.  
  311. From: chrille@zelator.in-berlin.de (Christian Kuss)
  312. Subject: Passwords with ModalDialog
  313. Date: 25 Mar 92 10:10:29 GMT
  314. Organization: Puplic-Access-Xenix-System
  315.  
  316. Hello...
  317. I've got a problem. I'm writing a small program which asks for a password.
  318. I use the ModalDialog call with a Filterproc to replace the characters in
  319. the EventRecord.Message with an '*'. All works fine, but I can't read the
  320. text with GetIText, there are only '*'. So I use another string to save all
  321. typed characters, but when the user edits with the mouse or arrow keys, my
  322. string is wrong.
  323. How would you write such a filterproc?
  324.  
  325. Chrille
  326.  
  327. - -- 
  328.  
  329.  
  330. +------------------------------+--------------------------+
  331. ! chrille@zelator.in-berlin.de ! Voice: 0049 30 403 43 54 ! 
  332. ! c.kuss@telemail.zer          ! Fax  : 0049 30 402 58 93 ! 
  333. +------------------------------+--------------------------+
  334.  
  335. +++++++++++++++++++++++++++
  336.  
  337. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  338. Organization: University of Illinois at Urbana
  339. Date: Wed, 25 Mar 1992 14:06:36 GMT
  340.  
  341. chrille@zelator.in-berlin.de (Christian Kuss) writes:
  342.  
  343. >Hello...
  344. >I've got a problem. I'm writing a small program which asks for a password.
  345. >I use the ModalDialog call with a Filterproc to replace the characters in
  346. >the EventRecord.Message with an '*'. All works fine, but I can't read the
  347. >text with GetIText, there are only '*'. So I use another string to save all
  348. >typed characters, but when the user edits with the mouse or arrow keys, my
  349. >string is wrong.
  350. >How would you write such a filterproc?
  351.  
  352. There's a "snippet" on ftp.apple.com which contains 3 ways to deal with the
  353. problem. I forget which month contains it.
  354.  
  355. >Chrille
  356.  
  357. >-- 
  358.  
  359.  
  360. >+------------------------------+--------------------------+
  361. >! chrille@zelator.in-berlin.de ! Voice: 0049 30 403 43 54 ! 
  362. >! c.kuss@telemail.zer          ! Fax  : 0049 30 402 58 93 ! 
  363. >+------------------------------+--------------------------+
  364. - -- 
  365. Mark Lanett, Software Tools Group, NCSA           mlanett@uiuc.edu or  NCSA.STG
  366. "People wander in and out of virtual rooms in virtual settings with virtual
  367. characters and virtual money and virtual armor and virtual weapons, which is
  368. virtually a good way to spend time, but not quite." -- Usenet Oracle
  369.  
  370. +++++++++++++++++++++++++++
  371.  
  372. From: dweisman@umiami.ir.miami.edu
  373. Date: 25 Mar 92 17:24:12 EST
  374. Organization: Univ of Miami IR
  375.  
  376. In article <ZXN1PDT@zelator.in-berlin.de>, chrille@zelator.in-berlin.de (Christian Kuss) writes:
  377. > Hello...
  378. > I've got a problem. I'm writing a small program which asks for a password.
  379. > I use the ModalDialog call with a Filterproc to replace the characters in
  380. > the EventRecord.Message with an '*'. All works fine, but I can't read the
  381. > text with GetIText, there are only '*'. So I use another string to save all
  382. > typed characters, but when the user edits with the mouse or arrow keys, my
  383. > string is wrong.
  384. > How would you write such a filterproc?
  385. > Chrille
  386.  
  387. I would suggest not allowing editing. There really isn't a need to edit a 
  388. password when you type it in. Just allow them to use the delete key to erase 
  389. the previous character (that's easy to implement; just shorten the string by a 
  390. character). You don't even have to use TextEdit.
  391. The alternative would be to do what the Sharing Setup control panel does with 
  392. passwords. Use TextEdit normally to enter the password (no *'s) and then when 
  393. they close the dialog, it will reopen with the *'s there.
  394. I would recommend the former suggestion more highly.
  395.  
  396. Dan
  397.  
  398. /-------------------------------------------------------------------------\
  399. |   Dan Weisman -  University of Miami - Florida   |  ||   ||   ||   ||   |
  400. |--------------------------------------------------|  ||   ||   ||\ /||   |
  401. |   INTERNET  -----> dweisman@umiami.IR.Miami.edu  |  ||   ||   || | ||   |
  402. |     BITNET  -----> dweisman@umiami               |  |||||||   || | ||   |
  403. |-------------------------------------------------------------------------|
  404. |  "Think for yourself and feel the walls become sand beneath your feet"  |
  405. |    -Queensryche, "Anybody Listening"                  |
  406. \_________________________________________________________________________/
  407.  
  408. +++++++++++++++++++++++++++
  409.  
  410. From: jack@umbio.med.miami.edu (Jack Herrington)
  411. Date: 26 Mar 92 14:27:28 GMT
  412. Organization: University of Miami Medical School
  413.  
  414. chrille@zelator.in-berlin.de (Christian Kuss) writes:
  415. >I've got a problem. I'm writing a small program which asks for a password.
  416. >I use the ModalDialog call with a Filterproc to replace the characters in
  417. >the EventRecord.Message with an '*'. All works fine, but I can't read the
  418. >text with GetIText, there are only '*'. So I use another string to save all
  419. >typed characters, but when the user edits with the mouse or arrow keys, my
  420. >string is wrong.
  421. >How would you write such a filterproc?
  422.  
  423. Right off the top, how about changing the editText to a userItem, handling
  424. the editing yourself (just use TE), then using a font with only bubbles
  425. (or whatever) as the editing font, and restricting characters to a known
  426. set.  Viola!
  427.  
  428. Just keep the font as a resource inside your application.
  429.  
  430. This avoids all hacking work-arounds, since 'TE' is standard, userItems are
  431. standard, and fonts are standard.  I think you can even use resedit to create
  432. the font.
  433. - -- 
  434. "Electric word 'life', it means forever and that's a might long time.  But I'm
  435.  here to tell yah, there's something else... The after-life, a word of
  436.  never-ending happiness, you can always see the sun, day or night.  So when you
  437.  call up that shrink in Beverly hills, you know the one, Dr. everything-we-all-
  438.  
  439. +++++++++++++++++++++++++++
  440.  
  441. Organization: Queen's University at Kingston
  442. Date: Friday, 27 Mar 1992 23:29:12 EST
  443. From: <CHARLESW@QUCDN.QueensU.CA>
  444.  
  445. There was an article in MacTutor (hmm, about a year ago?) that did this.
  446. Instead of using a substitute font, they used an off-window TE item, and
  447. shadowed everything in the on-window item but with bullets.  Nice, simple,
  448. works.
  449.  
  450. I just looked it up.  The article was in the July/91 MacTutor, and was
  451. written by Bill Schilit.
  452.  
  453. .../dave  Dave Charlesworth
  454.  
  455. +++++++++++++++++++++++++++
  456.  
  457. From: CXT105@psuvm.psu.edu (Christopher Huckabay Modeller Tate)
  458. Date: 31 Mar 92 00:29:17 GMT
  459. Organization: Penn State University
  460.  
  461. Hmmm.  I don't *like* the shadowing of bullets.
  462.  
  463. Sure, it proves that the machine is actually watching what you type, but
  464. it also shows the chap looking over my shoulder how many characters are in
  465. my password.
  466.  
  467. Printing spaces instead of bullets should move the insertion point to the
  468. right (demonstrating that the machine is indeed paying attention), but make
  469. it much harder for an "eaveslooker" to tell how many keys you've pressed.
  470.  
  471. - -------
  472. Christopher Tate                 |  Cryptogram #9:
  473. cxt105@psuvm.psu.edu             |
  474. CXT105@PSUVM.BITNET              |  EM DECY NYLBF LBB RZUAIF, DNYA
  475. - ---------------------------------|  RNP IZYF DNY XYBBP XUDDZA FDLP
  476. Send me the answer; I love mail! |  DNY FLCY?
  477.  
  478. +++++++++++++++++++++++++++
  479.  
  480. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  481. Organization: Kalamazoo College
  482. Date: Tue, 31 Mar 1992 13:05:05 GMT
  483.  
  484. CXT105@psuvm.psu.edu (Christopher Huckabay Modeller Tate) writes:
  485. >I don't *like* the shadowing of bullets.
  486. >
  487. >Sure, it proves that the machine is actually watching what you type, but
  488. >it also shows the chap looking over my shoulder how many characters are in
  489. >my password.
  490. >
  491. >Printing spaces instead of bullets should move the insertion point to the
  492. >right (demonstrating that the machine is indeed paying attention), but make
  493. >it much harder for an "eaveslooker" to tell how many keys you've pressed.
  494.  
  495. Just because security is a concern doesn't mean you have to have a
  496. mysterious user interface.  How about randomly printing one to three
  497. bullets per character typed?  (And remembering how many per char, of
  498. course, when the user backspaces.)
  499. - -- 
  500.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  501.  
  502. +++++++++++++++++++++++++++
  503.  
  504. Organization: Queen's University at Kingston
  505. Date: Wednesday, 1 Apr 1992 23:49:10 EST
  506. From: <CHARLESW@QUCDN.QueensU.CA>
  507.  
  508. Re: Echoing bullets for keystrokes as a security risk
  509.  
  510.   My feeling is that this is not a major risk.  (People writing down passwords
  511. somewhere near or even on (yes on!) their machines is a bigger risk in my
  512. experience.)  For example, I'm happy to tell you my password is 8 characters.
  513. I'll even throw in a big bonus hint: it's not a normal English word.  Now
  514. remember, you have to type each guess into a dialog... (and maybe the dialog
  515. starts evasion tactics after 10 bad guesses...)
  516.  
  517. Cheers,
  518.  
  519. .../dave    Dave Charlesworth
  520.  
  521. +++++++++++++++++++++++++++
  522.  
  523. From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
  524. Date: 2 Apr 92 02:41:00 GMT
  525. Organization: MacDTS, Apple Computer
  526.  
  527. In article <ZXN1PDT@zelator.in-berlin.de>, chrille@zelator.in-berlin.de (Christian Kuss) writes:
  528. > Hello...
  529. > I've got a problem. I'm writing a small program which asks for a password.
  530. > I use the ModalDialog call with a Filterproc to replace the characters in
  531. > the EventRecord.Message with an '*'. All works fine, but I can't read the
  532. > text with GetIText, there are only '*'. So I use another string to save all
  533. > typed characters, but when the user edits with the mouse or arrow keys, my
  534. > string is wrong.
  535. > How would you write such a filterproc?
  536. > Chrille
  537.  
  538. Check out my Password sample code snippet, available from ftp.apple.com in:
  539. /dts/mac/sc/snippets/toolbox.iac/other/password.hqx
  540. (apparently somebody went overboard with the whole directories thing).  It
  541. shows three different ways to implement a password dialog, each of which
  542. allows complete editing.
  543.  
  544. Tim Dierks
  545. MacDTS, but I like it anyway (MB, take note)
  546.  
  547. ---------------------------
  548.  
  549. From: marten@uidesign.se (Marten Sorliden)
  550. Subject: Launch App & Doc
  551. Date: 25 Mar 92 11:02:01 GMT
  552. Organization: UI Design AB, Linkoping, Sweden
  553.  
  554.  
  555. I am writing an application able to launch other applications. I use the
  556. function LaunchApplication in the Process Manager, Inside Macintosh, 
  557. Volume VI. This works fine. However, I want to launch applications and make 
  558. them open a specific document, or just open the document if the application 
  559. already is running. 
  560.  
  561. The LaunchParamBlockRec used by the function LaunchApplication has got a 
  562. parameter, launchAppParametrs, which should be used as an optional pointer to 
  563. a high-level event, which is sent as the first event to the application. 
  564. My intention was to use this parameter. I created an Apple event whith the 
  565. Event ID, kAEOpenDocumetns and containing the information of the document to
  566. be opened. But how do I convert the Apple Event to a regular high-level event 
  567. so launchAppParametrs can point to it?
  568.  
  569. I have also considerd the use of other methods to launch applications and to 
  570. make other applications open documents. Technical Note #126 discusses how to 
  571. call _Launch. But it seems to be a unsafe way since the _Launch trap is a 
  572. subject of change. The AppleEvents, High-level events and the Process Manager 
  573. on the other hand are not supported by old applications.
  574.  
  575. I'm working in THINK C 5.0
  576.  
  577. Any help would be appreciated.
  578.  
  579. Thanks,
  580.  
  581.  .      _
  582. Marten Sorliden
  583.  
  584. - --
  585.  
  586. Internet:  marten@uidesign.se
  587.  
  588. +++++++++++++++++++++++++++
  589.  
  590. From: Joe.Francis@dartmouth.edu (Joe Francis)
  591. Date: 26 Mar 92 04:09:03 GMT
  592. Organization: Dartmouth College, Hanover, NH
  593.  
  594. Apple has some "Snippets" code to do exactly what you describe. 
  595. Snippets may be anonymously ftp'd from on ftp.apple.com.  They can also
  596. be found on the ETO CD, should you be an ETO subscriber, and I believe
  597. they are also on the Developer CD, which you receive if you are a
  598. registered developer or have a DEVELOP magazine subscription.
  599.  
  600. +++++++++++++++++++++++++++
  601.  
  602. From: ross@bnr.ca (Ross Brown)
  603. Date: 26 Mar 92 01:34:13 GMT
  604. Organization: Bell-Northern Research
  605.  
  606. In article <162@bladerunner.uidesign.se> marten@uidesign.se (Marten Sorliden)
  607. writes:
  608. >
  609. >I am writing an application able to launch other applications. I use the
  610. >function LaunchApplication in the Process Manager, Inside Macintosh, 
  611. >Volume VI. This works fine. However, I want to launch applications and make 
  612. >them open a specific document, or just open the document if the application 
  613. >already is running. 
  614. >[stuff deleted]
  615.  
  616. I think what you need (in System 7, anyway) is the 'sope' Finder AppleEvent.
  617.  
  618. Ross Brown
  619. Bell-Northern Research Ltd.
  620. Ottawa, Ontario, Canada
  621. ross@bnr.ca
  622. Opinions expressed do not necessarily represent those of BNR.
  623.  
  624. +++++++++++++++++++++++++++
  625.  
  626. From: anders@verity.com (Anders Wallgren)
  627. Date: 26 Mar 92 01:27:20 GMT
  628. Organization: Verity, Inc., Mountain View, CA
  629.  
  630. What you need to do is coerce your event:
  631.  
  632.     AECoerceDesc(&theEvent, typeAppParameters, &launchDesc);
  633.  
  634. You can look at the LaunchWithDoc snippet from DTS for more details.
  635.  
  636. anders
  637.  
  638. ---------------------------
  639.  
  640. From: kamprath@hellfire.engin.umich.edu (Michael Fredric Kamprath)
  641. Subject: Increasing an application's heap size
  642. Date: 27 Mar 92 22:27:57 GMT
  643. Organization: University of Michigan Engineering, Ann Arbor
  644.  
  645.  
  646.  
  647. How can I increase my applications's heap (using Think C 4.0.5).
  648. Presently, the command:
  649.  
  650.     curAvailSize = MaxMem(&totalAvailSize);
  651.  
  652. returns curAvailSize ~6000 bytes and totalAvailSize ~4000000 bytes.
  653. I am not really clear on how to increase curAvailSize any large.  
  654. If it is not possible for the application's heap to be increased, how
  655. do I create an extra heap outside of the program's memory for use, and
  656. access by, pointers?
  657.  
  658. Thanks for any help!!!
  659.  
  660. Michael Kamprath
  661. kamprath@caen.engin.umich.edu
  662. - --
  663. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  664. \                    |                   /
  665. /    Michael Fredric Kamprath    |                   \
  666. /    kamprath@caen.engin.umich.edu    |                   \
  667. \                    |                   /                     
  668. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  669.  
  670. +++++++++++++++++++++++++++
  671.  
  672. From: mauser@intercon.com (Richard Chandler)
  673. Date: 31 Mar 92 18:24:25 GMT
  674. Organization: InterCon Systems Corporation
  675.  
  676. In article <RSd+fY-@engin.umich.edu>, kamprath@hellfire.engin.umich.edu 
  677. (Michael Fredric Kamprath) writes:
  678. > How can I increase my applications's heap (using Think C 4.0.5).
  679. > Presently, the command:
  680. >     curAvailSize = MaxMem(&totalAvailSize);
  681. > returns curAvailSize ~6000 bytes and totalAvailSize ~4000000 bytes.
  682. > I am not really clear on how to increase curAvailSize any large.  
  683. > If it is not possible for the application's heap to be increased, how
  684. > do I create an extra heap outside of the program's memory for use, and
  685. > access by, pointers?
  686.  
  687. Call MaxApplZone after you've initialized all the toolbox stuff.
  688.  
  689. > Thanks for any help!!!
  690.  
  691. You're welcome.
  692.  
  693. - --
  694. People are more violently opposed to fur than leather, because it's safer to
  695. harass rich women than biker gangs.
  696. "Ride a motorcycle.  Save Gas, Oil, Rubber, Steel, Aluminum, Parking Spaces,
  697.  The Environment, and Money.  Plus, you get to wear all the leather you want!"
  698.  Rich Chandler, DoD #296
  699.  
  700. +++++++++++++++++++++++++++
  701.  
  702. From: bear@harlqn.co.uk (Andy Edwards)
  703. Date: 2 Apr 92 14:07:37 GMT
  704. Organization: Harlequin Limited, Cambridge, England
  705.  
  706.  
  707. Hi,
  708.  
  709. >>How can I increase my applications's heap (using Think C 4.0.5).
  710. >>Presently, the command:
  711. >>
  712. >>    curAvailSize = MaxMem(&totalAvailSize);
  713. >>
  714. >>returns curAvailSize ~6000 bytes and totalAvailSize ~4000000 bytes.
  715. >>I am not really clear on how to increase curAvailSize any large.  
  716.  
  717. Try MaxApplZone() ; this should expand the heap.
  718.  
  719. >>If it is not possible for the application's heap to be increased, how
  720. >>do I create an extra heap outside of the program's memory for use, and
  721. >>access by, pointers?
  722.  
  723. There are some new traps in MultiFinder/ System 7 which allow you to
  724. allocate "multifinder temporary memory", there are pointer & handle
  725. allocate/dispose call variants. I believe that you can't hold this
  726. memory across WaitNextEvent calls, only allocate & free it between
  727. WaitNextEvent calls. A good used of MF temporary memory is when you
  728. are grief stricken by a shortage of memory.
  729.  
  730. >>Thanks for any help!!!
  731. >>
  732. >>Michael Kamprath
  733. >>kamprath@caen.engin.umich.edu
  734.  
  735. +--: Andy Edwards :----------*=================*------------------------------+
  736. | Macintosh fire fighter,    | Harlequin Ltd.  |      uucp: bear@harlqn.uucp  |
  737. | deity, PostScript language | Barrington Hall |     janet: bear@uk.co.harlqn |
  738. | level 2 porter and PAP     | Barrington      | applelink: harlequin         |
  739. | server clone originator.   | Cambridge       |     voice: 0223 872522       |
  740. |                            | CB2 5RG         |            +44-223-872-522   |
  741. | My opinions only.          | England         |       fax: 0223 872519       |
  742. +----------------------------*=================*------------------------------+
  743.  
  744. ---------------------------
  745.  
  746. From: Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz)
  747. Subject: No, I'm Not Programming Graphics & Sound, I'm Playing 
  748. Date: 31 Mar 92 03:46:29 GMT
  749. Organization: Dartmouth College, Hanover, NH
  750.  
  751. >No matter what I try, I cannot seem to get the Sound Manager to
  752. >play asynchronous sound without generating spurious interrupts.
  753.  
  754.  Are you using the sound manager, or the sound driver? The manager is
  755. sys. 7 compatible, the driver is good at playing aweful staticy stuff
  756. under sys. 7.
  757.  
  758. >    It is mistaken to think that System 6.0.5 is stable and that one
  759. >should develop for the lowest decent denominator?
  760.  
  761.  System 7.0 is the most stable System version I've ever used. An app
  762. I'm writing to be as "System 7 saavy" (arrrrgh!) as possible runs fine
  763. on a 512 (no "E") and system 4.2 or something.
  764.  
  765. Just a stupid question (flame if ya like), but have you checked the
  766. Tech. Notes? I-Mac vol VI?
  767.  
  768. Jeremiah
  769. JerBl@Dartmouth.edu
  770. The opinions expressed are mine only and not those of Dartmouth
  771. College, Apple Computer, Santa and/or Satan, any of his elves, Jimmy
  772. Swaggart, Dan Quayle, Bill Gates, or anyone you know.
  773.  
  774. +++++++++++++++++++++++++++
  775.  
  776. From: orpheus@reed.edu (P. Hawthorne)
  777. Date: 2 Apr 92 07:46:36 GMT
  778. Organization: Reed College, Portland OR
  779.  
  780.  
  781.   Jeremiah.Blatz@dartmouth.edu (Jeremiah Blatz) writes:
  782. . Are you using the sound manager, or the sound driver?
  783.  
  784.     The Sound Manager under 6.0.5, which is apparently a seething ferment of
  785. interesting behavior, while being much more tame than previous versions...
  786.     I guess the lowest common denominator is going to be 6.0.7, but under
  787. the tacit assumption that the users who care would stick with the 6.0.5.
  788. print drivers. Since the seminal 32-Bit QD 1.2 merely required 6.0.5., I
  789. had hoped to fully support graphics and sound under that system version.
  790.     C'est la vie.
  791.  
  792.  
  793. . System 7.0 is the most stable System version I've ever used. An app
  794. . I'm writing to be as "System 7 saavy" (arrrrgh!) as possible runs fine
  795. . on a 512 (no "E") and system 4.2 or something.
  796.  
  797.     That's really cool! This might sound uppity, and I hope that you don't
  798. take it that way, but how easily replicated is your project? I mean, how
  799. hard is it to plug and play a different application with that code? Are you
  800. encoding in a resource what particulars are required for the app?
  801.     To be sure, 7 is the neatest thing since sliced bread. However, it is
  802. not the perfect system for everyone, even if they have modern hardware.
  803.     With a fairly large segment of the people that run in my circles, an
  804. admittedly insular list of beta testers and amiably curious colleagues, 7
  805. gets a worse rap than a passle of inits whose names begin with spaces.
  806.  
  807.  
  808. . Just a stupid question (flame if ya like), but have you checked the
  809. . Tech. Notes? I-Mac vol VI?
  810.  
  811.     Oh, how could anyone flame another for suggesting that?
  812.     And yes, actually I have. I try to exhaust all other resources before
  813. posting to the net...
  814.  
  815.     Theus (orpheus@reed.edu)
  816.  
  817. ---------------------------
  818.  
  819. From: nessett@llnl.gov (Danny M. Nessett)
  820. Subject: MPW shell script parameter manipulation
  821. Date: 31 Mar 92 16:56:50 GMT
  822. Organization: LLNL
  823.  
  824. I am a novice MPW shell script programmer with the following problem. I need
  825. to write a schell script that accepts a fully specified filename and from
  826. that parameter sets a shell variable to the directory in which the filename
  827. resides. This shell variable will be used in the remainder of the shell
  828. script. I've looked at the MPW programming manual, but have not found a way
  829. that this can be done. Does anyone know if this is possible with shell
  830. commands? If not, is there some other way I can accomplish the same thing?
  831. Thanks for any help.
  832.  
  833. Regards,
  834.  
  835. Dan Nessett
  836.  
  837. +++++++++++++++++++++++++++
  838.  
  839. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  840. Date: 31 Mar 92 18:30:14 GMT
  841. Organization: University of Illinois at Urbana
  842.  
  843. nessett@llnl.gov (Danny M. Nessett) writes:
  844.  
  845. >I am a novice MPW shell script programmer with the following problem. I need
  846. >to write a schell script that accepts a fully specified filename and from
  847. >that parameter sets a shell variable to the directory in which the filename
  848. >resides. This shell variable will be used in the remainder of the shell
  849. >script. I've looked at the MPW programming manual, but have not found a way
  850. >that this can be done. Does anyone know if this is possible with shell
  851. >commands? If not, is there some other way I can accomplish the same thing?
  852. >Thanks for any help.
  853.  
  854. #if StupidMPWTricks
  855. Welcome to the wonderfull world of MPW! Here you discover a language
  856. which lets you pass parameters to a script executing in its own
  857. environment, or execute a script in its parent's environment, but not
  858. pass parameters to a script executing in its parent's environment!
  859. #endif
  860.  
  861. That is: (where foo is a script)
  862. foo bar # passes "bar" to script but foo can't set my environment
  863. execute foo # foo is running in my environment but...
  864. execute foo bar # doesn't work. Actually it does but execute _explicitly_
  865.     # ignores parameters, so the "bar" dissapears.
  866.  
  867. I say just do a:
  868. set FOOPARAM bar
  869. execute betterfoo # betterfoo looks in FOOPARAM and sees "bar"
  870.  
  871. or make foo an alias...
  872. - -- 
  873. Mark Lanett, Software Tools Group, NCSA           mlanett@uiuc.edu or  NCSA.STG
  874. "People wander in and out of virtual rooms in virtual settings with virtual
  875. characters and virtual money and virtual armor and virtual weapons, which is
  876. virtually a good way to spend time, but not quite." -- Usenet Oracle
  877.  
  878. +++++++++++++++++++++++++++
  879.  
  880. From: tjc@pacvax.UUCP (Tom Colley)
  881. Date: 1 Apr 92 14:50:19 GMT
  882. Organization: Pacer Software Inc., Westborough, MA USA
  883.  
  884. In article <121428@lll-winken.LLNL.GOV> nessett@llnl.gov (Danny M. Nessett) writes:
  885. >I am a novice MPW shell script programmer with the following problem. I need
  886. >to write a schell script that accepts a fully specified filename and from
  887. >that parameter sets a shell variable to the directory in which the filename
  888. >resides. This shell variable will be used in the remainder of the shell
  889. >script. I've looked at the MPW programming manual, but have not found a way
  890. >that this can be done. Does anyone know if this is possible with shell
  891. >commands? If not, is there some other way I can accomplish the same thing?
  892. >Thanks for any help.
  893. >
  894. >Regards,
  895. >
  896. >Dan Nessett
  897.  
  898. If I understand you correctly, you want to take an argument to a script,
  899. and from that argument, strip off the directory portion of that
  900. argument.  
  901.  
  902. For the following script segment, in MPW, convert:  
  903. R to option-r, L to option-l (lowercase L), X to option-x
  904.  
  905. ### this assumes that the argument to be played with is the first arg.
  906.  
  907. Unset R1
  908. ( Evaluate "{1}" =~ /(([L:]*:)*)R1X/ ) > Dev:Null
  909. Set file_path "{R1}"
  910. echo "{file_path}"
  911.  
  912. Unset R1
  913. ( Evaluate "{1}" =~ /(([L:]*:)*)(X)R1/ ) > Dev:Null
  914. Set leaf_name "{R1}"
  915. echo "{leaf_name}"
  916.  
  917. ### This is essentially taken from the MPW docs on the Evaluate command 
  918. ### (pg 144 of vol 2 of the MPW 3.0 docs).
  919.  
  920. Hope this helps,
  921.  
  922. Tom Colley
  923. tjc@pacersoft.com   tjc%pacvax@uunet.uu.net
  924. ##watch my return address, it may be wrong
  925.  
  926. ---------------------------
  927.  
  928. From: roland@dna.lth.se (Roland Mansson)
  929. Subject: SUMMARY: Hotels in San Jose / WWDC in May
  930. Date: 30 Mar 92 12:08:10 GMT
  931. Organization: Lund University Computing Center, Sweden
  932.  
  933. I asked:
  934. >I'm going to the Worldwide Developers Conference in San Jose in May. Since
  935. >the conference schedule is very busy, there won't be much time left to
  936. >spend in the room. Therefore I would like suggestions of an inexpensive hotel
  937. >located near San Jose Convention Center. Please answer by e-mail; I'll
  938. >summarize.
  939.  
  940. The replies:
  941. From: engber@aristotle.ils.nwu.edu (Mike Engber)
  942. I was told the Holiday Inn Park Center Plaza for $89 a night - a special
  943. WWDC rat. Their number is 408-998-0400.
  944. I got this info from someone else, but he's a good guy and has been
  945. to the WWDC before. He says it's right across the street.
  946.  
  947. From: sw@network-analysis-ltd.co.uk (Sak Wathanasin)
  948. I stayed in the Holiday Inn across the road from the Convention Centre.
  949. It was OK, and handy to nip back to dump all the freebies Apple handed out.
  950.  
  951. Thanks to those who replied.
  952. - -- 
  953. Roland Mansson, Lund University Computing Center, Box 783, S220 07 Lund, Sweden
  954. Phone: +46-46107436   Fax: +46-46138225   Bitnet: roland_m@seldc52
  955. Internet: roland.mansson@ldc.lu.se   or   roland.mansson%ldc.lu.se@uunet.uu.net
  956. UUCP: {uunet,mcvax}!sunic!ldc.lu.se!roland.mansson    AppleLink: SW0472
  957.  
  958. +++++++++++++++++++++++++++
  959.  
  960. From: roland@dna.lth.se (Roland Mansson)
  961. Date: 1 Apr 92 09:36:59 GMT
  962. Organization: Lund University Computing Center, Sweden
  963.  
  964. I got this directly from Apple:
  965.  
  966. From:   DEV.EVENTS                      Developer Events
  967. Sub:    1992 WWDC hotel information
  968.  
  969. We have made arrangements for discount rates at the following hotels.  Be sure
  970. to mention the conference when booking your room to receive these discount
  971. rates.
  972.  
  973.    The Fairmont Hotel     $138/single
  974.    170 S. Market Street   $158/double
  975.    San Jose, CA
  976.    800/527-4727 (in the U.S. and Canada ONLY)
  977.    408/998-1900 (for all other countries)
  978.    Note:  The Fairmont Hotel is #1 in luxury.
  979.    AppleLink workstations will be available in a special meeting room at the
  980.    Fairmont 24 hours a day.
  981.  
  982.    The Hyatt San Jose    $109/single
  983.    1740 N. First Street  $134/double
  984.    San Jose, CA
  985.    800/233-1234 (in the U.S. and Canada ONLY)
  986.    408/993-1234 (for all other countries)
  987.    NOTE:  If you choose to stay here, you will have to take
  988.    the Light Rail to get to the Convention Center.
  989.  
  990.    Red Lion Hotel          $115/single
  991.    2050 Gateway Place      $115/double
  992.    San Jose, CA
  993.    800/547-8010 (in the U.S. and Canada ONLY)
  994.    408/453-4000 (for all other countries)
  995.    NOTE:   Walk to First Street and take the Light  Rail to the Convention
  996. Center (a 10 minute ride).
  997.  
  998.  
  999.     Hotel De Anza      $120/single
  1000.     233 W. Santa Clara Street
  1001.     San Jose, CA
  1002.     800/843-3700 (in the U.S. and Canada ONLY)
  1003.     408/286-1000 (for all other countries)
  1004.     NOTE:  4 blocks away, a five minute walk to the Convention Center.
  1005.  
  1006.    Holiday Inn Airport $77/single
  1007.    1355 N. the Street  $77/double
  1008.    San Jose, CA
  1009.    800/465-4329 (in the U.S. and Canada ONLY)
  1010.    408/453-5340 (for all other countries)
  1011.    NOTE:  If you choose to stay here, you will have to take
  1012.    the Light Rail to get to the Convention Center (a 10 minute ride).
  1013.    It is #1 in price.
  1014.  
  1015.    Holiday Inn, Park Center Plaza  $89/single
  1016.    282 Almaden Blvd.               $89/double
  1017.    San Jose, CA
  1018.    800/465-4329 (in the U.S. and Canada ONLY)
  1019.    408/998-0400 (for all other countries)
  1020.    NOTE:  Holiday Inn is located across the street from the
  1021.    San Jose Convention Center.
  1022.  
  1023.    Bed & Breakfast Inns
  1024.    NOTE:  We don`t have discount rates at the following
  1025.    Bed & breakfast Inns.  This is just in case someone wants to stay at
  1026.    a Bed & Breakfast Inn.
  1027.  
  1028.    The Hensley House       $75 - 100/double
  1029.    456 North 3rd Street
  1030.    San Jose, CA
  1031.    408/298-3537
  1032.    NOTE:  Walk a block, take the Light Rail at the Eyer station on First Street
  1033.    (a 10 minute ride).
  1034.  
  1035.    Briar Rose           $65/shared bath
  1036.    897 Jackson Street   $70 - 85/private bath
  1037.    San Jose, CA         $120/private cottage
  1038.    408/279-5999
  1039.    NOTE:  Either a 45 minute walk, a 5 minute drive, or take Santa Clara County
  1040.    Transit's bus 62 from First Street.
  1041.  
  1042. If you have any other questions, please link me at DEV.EVENTS or call
  1043. (408)974-4897.
  1044.  
  1045. Nancy Carr
  1046. Apple Developer Events
  1047.  
  1048.  
  1049.  
  1050. - -- 
  1051. Roland Mansson, Lund University Computing Center, Box 783, S220 07 Lund, Sweden
  1052. Phone: +46-46107436   Fax: +46-46138225   Bitnet: roland_m@seldc52
  1053. Internet: roland.mansson@ldc.lu.se   or   roland.mansson%ldc.lu.se@uunet.uu.net
  1054. UUCP: {uunet,mcvax}!sunic!ldc.lu.se!roland.mansson    AppleLink: SW0472
  1055.  
  1056. ---------------------------
  1057.  
  1058. From: bruss@cs.ucsd.edu (Brian Russ)
  1059. Subject: Dialog/Think C Questions
  1060. Date: 31 Mar 92 23:32:59 GMT
  1061. Organization: =CSE Dept., U.C. San Diego
  1062.  
  1063.  
  1064.     I'm implementing a (modeless) dialog box with several editText
  1065. fields, and I've some questions ...
  1066.  
  1067.     (1)  Hitting the RETURN key inside a text field blanks out the
  1068. text -- the text is still there (if I go to another field and back
  1069. to the first, I can find the text), but it's temporarily erased.
  1070. Any ideas on why this might be happening?
  1071.  
  1072.     (2)  The TAB key is supposed to allow auto-advancement from one
  1073. field to the next -- the problem is that I sometimes need to move
  1074. to a field that's different that the "next" one in the item list.
  1075. So what I really need is a way to arbitrarily choose any editText
  1076. item as the current one accepting input -- ideas?
  1077.  
  1078.     FYI, I'm very new to Think C and the Mac, but am very familiar
  1079. with C itself.  I'm doing all this on a IIsi, System 7 ...
  1080.  
  1081.     Thanks for your help ...
  1082.  
  1083.                     Brian
  1084. - -- 
  1085. Brian Russ
  1086. CSE Department, UC San Diego
  1087. ..!sdcsvax!bruss    bruss@beowulf.ucsd.edu
  1088.  
  1089. +++++++++++++++++++++++++++
  1090.  
  1091. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  1092. Date: 1 Apr 92 21:19:38 GMT
  1093. Organization: Royal Institute of Technology, Stockholm, Sweden
  1094.  
  1095. > bruss@cs.ucsd.edu (Brian Russ) writes:
  1096.  
  1097.        (1)  Hitting the RETURN key inside a text field blanks out the
  1098.    text -- the text is still there (if I go to another field and back
  1099.    to the first, I can find the text), but it's temporarily erased.
  1100.    Any ideas on why this might be happening?
  1101.  
  1102. Yes, you're entering a return (aka line break) which makes the
  1103. edit text auto-scroll. Since it's only one line...
  1104.  
  1105. You could use a dialog event filter to catch returns.
  1106.  
  1107. The same thing goes for selecting fields; you could catch
  1108. the tab key and do whatever you want.
  1109.  
  1110. - -- 
  1111. h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
  1112.  
  1113. ---------------------------
  1114.  
  1115. End of C.S.M.P. Digest
  1116. **********************
  1117.